<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>分支语句</title>
</head>
<body>

</body>
<script type="text/javascript">
    let a = -0;

    if(a > 0) {
        document.write("正数");
    } else if(a == 0) {
        document.write("零")
    } else {
        document.write("负数");
    }

    let b = 212;
    switch (b) {
        case 1: document.write("周一"); break;
        case 2: document.write("周二");break;
        case 3: document.write("周三");break;
        case 4: document.write("周四");break;
        case 5: document.write("周五");break;
        case 6: document.write("周六");break;
        case 7: document.write("周日");break;
        default: document.write("未知的");break;
    }
</script>
</html>
